package com.seraph.zys.dao.impl;

import com.seraph.bi.suite.support.domain.pagination.PageBox;
import com.seraph.bi.suite.support.domain.pagination.PageObject;
import com.seraph.zys.dao.PccBaPatientsTreatNumDAO;
import com.seraph.zys.dao.domain.PccBaPatientsTreatNum;
import com.seraph.zys.dao.domain.PccBaPatientsTreatNumExample;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

@Repository
public class PccBaPatientsTreatNumDAOImpl extends SqlMapClientDaoSupport implements PccBaPatientsTreatNumDAO {

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PccBaPatientsTreatNumDAOImpl() {
        super();
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public Integer insert(PccBaPatientsTreatNum record) {
        Object newKey = getSqlMapClientTemplate().insert("pcc_ba_patients_treat_num.abatorgenerated_insert", record);
        return (Integer) newKey;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int updateByPrimaryKey(PccBaPatientsTreatNum record) {
        int rows = getSqlMapClientTemplate().update("pcc_ba_patients_treat_num.abatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int updateByPrimaryKeySelective(PccBaPatientsTreatNum record) {
        int rows = getSqlMapClientTemplate().update("pcc_ba_patients_treat_num.abatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public List selectByExample(PccBaPatientsTreatNumExample example, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        List list = getSqlMapClientTemplate().queryForList("pcc_ba_patients_treat_num.abatorgenerated_selectByExample", parms);
        return list;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public List selectByExample(PccBaPatientsTreatNumExample example) {
        return selectByExample(example, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PccBaPatientsTreatNum selectByPrimaryKey(Integer id) {
        PccBaPatientsTreatNum key = new PccBaPatientsTreatNum();
        key.setId(id);
        PccBaPatientsTreatNum record = (PccBaPatientsTreatNum) getSqlMapClientTemplate().queryForObject("pcc_ba_patients_treat_num.abatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int deleteByExample(PccBaPatientsTreatNumExample example) {
        int rows = getSqlMapClientTemplate().delete("pcc_ba_patients_treat_num.abatorgenerated_deleteByExample", getExampleParms(example));
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int deleteByPrimaryKey(Integer id) {
        PccBaPatientsTreatNum key = new PccBaPatientsTreatNum();
        key.setId(id);
        int rows = getSqlMapClientTemplate().delete("pcc_ba_patients_treat_num.abatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getIDExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getId_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NULL", "Y");
            } else {
                parms.put("AND_ID_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_ID_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_EQUALS", "Y");
            } else {
                parms.put("AND_ID_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_ID_NOT_EQUALS", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GT", "Y");
            } else {
                parms.put("AND_ID_GT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_GE", "Y");
            } else {
                parms.put("AND_ID_GE", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LT", "Y");
            } else {
                parms.put("AND_ID_LT", "Y");
            }
            parms.put("id", example.getId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_ID_LE", "Y");
            } else {
                parms.put("AND_ID_LE", "Y");
            }
            parms.put("id", example.getId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getFISCAL_YEARExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getFiscalYear_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_NULL", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_NOT_EQUALS", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_GE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_GE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LT", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LT", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FISCAL_YEAR_LE", "Y");
            } else {
                parms.put("AND_FISCAL_YEAR_LE", "Y");
            }
            parms.put("fiscalYear", example.getFiscalYear());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getFROM_AREAExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getFromArea_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_NULL", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FROM_AREA_NOT_EQUALS", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GT", "Y");
            } else {
                parms.put("AND_FROM_AREA_GT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_GE", "Y");
            } else {
                parms.put("AND_FROM_AREA_GE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LT", "Y");
            } else {
                parms.put("AND_FROM_AREA_LT", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LIKE:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FROM_AREA_LIKE", "Y");
            } else {
                parms.put("AND_FROM_AREA_LIKE", "Y");
            }
            parms.put("fromArea", example.getFromArea());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getSORT_IDExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getSortId_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_NULL", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SORT_ID_NOT_EQUALS", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GT", "Y");
            } else {
                parms.put("AND_SORT_ID_GT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_GE", "Y");
            } else {
                parms.put("AND_SORT_ID_GE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LT", "Y");
            } else {
                parms.put("AND_SORT_ID_LT", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SORT_ID_LE", "Y");
            } else {
                parms.put("AND_SORT_ID_LE", "Y");
            }
            parms.put("sortId", example.getSortId());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getSUSPECTS_NUMExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getSuspectsNum_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_NULL", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_EQUALS", "Y");
            }
            parms.put("suspectsNum", example.getSuspectsNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_NOT_EQUALS", "Y");
            }
            parms.put("suspectsNum", example.getSuspectsNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_GT", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_GT", "Y");
            }
            parms.put("suspectsNum", example.getSuspectsNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_GE", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_GE", "Y");
            }
            parms.put("suspectsNum", example.getSuspectsNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_LT", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_LT", "Y");
            }
            parms.put("suspectsNum", example.getSuspectsNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_SUSPECTS_NUM_LE", "Y");
            } else {
                parms.put("AND_SUSPECTS_NUM_LE", "Y");
            }
            parms.put("suspectsNum", example.getSuspectsNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getCZTY_NUMExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getCztyNum_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_NULL", "Y");
            } else {
                parms.put("AND_CZTY_NUM_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_CZTY_NUM_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_CZTY_NUM_EQUALS", "Y");
            }
            parms.put("cztyNum", example.getCztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_CZTY_NUM_NOT_EQUALS", "Y");
            }
            parms.put("cztyNum", example.getCztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_GT", "Y");
            } else {
                parms.put("AND_CZTY_NUM_GT", "Y");
            }
            parms.put("cztyNum", example.getCztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_GE", "Y");
            } else {
                parms.put("AND_CZTY_NUM_GE", "Y");
            }
            parms.put("cztyNum", example.getCztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_LT", "Y");
            } else {
                parms.put("AND_CZTY_NUM_LT", "Y");
            }
            parms.put("cztyNum", example.getCztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_CZTY_NUM_LE", "Y");
            } else {
                parms.put("AND_CZTY_NUM_LE", "Y");
            }
            parms.put("cztyNum", example.getCztyNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getFZTY_NUMExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getFztyNum_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_NULL", "Y");
            } else {
                parms.put("AND_FZTY_NUM_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_FZTY_NUM_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_FZTY_NUM_EQUALS", "Y");
            }
            parms.put("fztyNum", example.getFztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_FZTY_NUM_NOT_EQUALS", "Y");
            }
            parms.put("fztyNum", example.getFztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_GT", "Y");
            } else {
                parms.put("AND_FZTY_NUM_GT", "Y");
            }
            parms.put("fztyNum", example.getFztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_GE", "Y");
            } else {
                parms.put("AND_FZTY_NUM_GE", "Y");
            }
            parms.put("fztyNum", example.getFztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_LT", "Y");
            } else {
                parms.put("AND_FZTY_NUM_LT", "Y");
            }
            parms.put("fztyNum", example.getFztyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_FZTY_NUM_LE", "Y");
            } else {
                parms.put("AND_FZTY_NUM_LE", "Y");
            }
            parms.put("fztyNum", example.getFztyNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getTY_NUMExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getTyNum_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_NULL", "Y");
            } else {
                parms.put("AND_TY_NUM_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_TY_NUM_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_TY_NUM_EQUALS", "Y");
            }
            parms.put("tyNum", example.getTyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_TY_NUM_NOT_EQUALS", "Y");
            }
            parms.put("tyNum", example.getTyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_GT", "Y");
            } else {
                parms.put("AND_TY_NUM_GT", "Y");
            }
            parms.put("tyNum", example.getTyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_GE", "Y");
            } else {
                parms.put("AND_TY_NUM_GE", "Y");
            }
            parms.put("tyNum", example.getTyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_LT", "Y");
            } else {
                parms.put("AND_TY_NUM_LT", "Y");
            }
            parms.put("tyNum", example.getTyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_TY_NUM_LE", "Y");
            } else {
                parms.put("AND_TY_NUM_LE", "Y");
            }
            parms.put("tyNum", example.getTyNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getXMY_NUMExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getXmyNum_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_NULL", "Y");
            } else {
                parms.put("AND_XMY_NUM_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_XMY_NUM_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_XMY_NUM_EQUALS", "Y");
            }
            parms.put("xmyNum", example.getXmyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_XMY_NUM_NOT_EQUALS", "Y");
            }
            parms.put("xmyNum", example.getXmyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_GT", "Y");
            } else {
                parms.put("AND_XMY_NUM_GT", "Y");
            }
            parms.put("xmyNum", example.getXmyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_GE", "Y");
            } else {
                parms.put("AND_XMY_NUM_GE", "Y");
            }
            parms.put("xmyNum", example.getXmyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_LT", "Y");
            } else {
                parms.put("AND_XMY_NUM_LT", "Y");
            }
            parms.put("xmyNum", example.getXmyNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_XMY_NUM_LE", "Y");
            } else {
                parms.put("AND_XMY_NUM_LE", "Y");
            }
            parms.put("xmyNum", example.getXmyNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getOTHER_NUMExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getOtherNum_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_NULL", "Y");
            } else {
                parms.put("AND_OTHER_NUM_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_OTHER_NUM_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_OTHER_NUM_EQUALS", "Y");
            }
            parms.put("otherNum", example.getOtherNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_OTHER_NUM_NOT_EQUALS", "Y");
            }
            parms.put("otherNum", example.getOtherNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_GT", "Y");
            } else {
                parms.put("AND_OTHER_NUM_GT", "Y");
            }
            parms.put("otherNum", example.getOtherNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_GE", "Y");
            } else {
                parms.put("AND_OTHER_NUM_GE", "Y");
            }
            parms.put("otherNum", example.getOtherNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_LT", "Y");
            } else {
                parms.put("AND_OTHER_NUM_LT", "Y");
            }
            parms.put("otherNum", example.getOtherNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_OTHER_NUM_LE", "Y");
            } else {
                parms.put("AND_OTHER_NUM_LE", "Y");
            }
            parms.put("otherNum", example.getOtherNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getNDYFJH_NUMExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        switch (example.getNdyfjhNum_Indicator()) {
        case PccBaPatientsTreatNumExample.EXAMPLE_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_NULL", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_NULL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_NOT_NULL", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_NOT_NULL", "Y");
            }
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_EQUALS", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_EQUALS", "Y");
            }
            parms.put("ndyfjhNum", example.getNdyfjhNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_NOT_EQUALS:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_NOT_EQUALS", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_NOT_EQUALS", "Y");
            }
            parms.put("ndyfjhNum", example.getNdyfjhNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_GT", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_GT", "Y");
            }
            parms.put("ndyfjhNum", example.getNdyfjhNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_GREATER_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_GE", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_GE", "Y");
            }
            parms.put("ndyfjhNum", example.getNdyfjhNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_LT", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_LT", "Y");
            }
            parms.put("ndyfjhNum", example.getNdyfjhNum());
            break;
        case PccBaPatientsTreatNumExample.EXAMPLE_LESS_THAN_OR_EQUAL:
            if (example.isCombineTypeOr()) {
                parms.put("OR_NDYFJH_NUM_LE", "Y");
            } else {
                parms.put("AND_NDYFJH_NUM_LE", "Y");
            }
            parms.put("ndyfjhNum", example.getNdyfjhNum());
            break;
        }
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    private Map getExampleParms(PccBaPatientsTreatNumExample example) {
        Map parms = new HashMap();
        parms.putAll(getIDExampleParms(example));
        parms.putAll(getFISCAL_YEARExampleParms(example));
        parms.putAll(getFROM_AREAExampleParms(example));
        parms.putAll(getSORT_IDExampleParms(example));
        parms.putAll(getSUSPECTS_NUMExampleParms(example));
        parms.putAll(getCZTY_NUMExampleParms(example));
        parms.putAll(getFZTY_NUMExampleParms(example));
        parms.putAll(getTY_NUMExampleParms(example));
        parms.putAll(getXMY_NUMExampleParms(example));
        parms.putAll(getOTHER_NUMExampleParms(example));
        parms.putAll(getNDYFJH_NUMExampleParms(example));
        return parms;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int selectCountByExample(PccBaPatientsTreatNumExample example) {
        Map parms = getExampleParms(example);
        int count = ((Integer)getSqlMapClientTemplate().queryForObject("pcc_ba_patients_treat_num.abatorgenerated_selectCountByExample", parms)).intValue();
        return count;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PageBox selectByExampleWithPaging(PccBaPatientsTreatNumExample example, int pageSize, int pageNum, String orderByClause) {
        Map parms = getExampleParms(example);
        if (orderByClause != null) {
            parms.put("ABATOR_ORDER_BY_CLAUSE", orderByClause);
        }
        PageBox pageBox = new PageBox();
        PageObject pageObject = new PageObject();
        pageObject.setPageSize(pageSize);
        pageObject.setPageIndex(pageNum);
        int itemAmount = selectCountByExample(example);
        pageObject.setItemAmount(itemAmount);
        List pageList = null;
        if (pageObject.getBeginIndex() <= pageObject.getItemAmount()) {
            pageList = (getSqlMapClientTemplate().queryForList("pcc_ba_patients_treat_num.abatorgenerated_selectByExample", parms, pageObject.getBeginIndex() - 1, pageSize));
        }
        pageBox.setPageObject(pageObject);
        pageBox.setPageList(pageList);
        return pageBox;
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public PageBox selectByExampleWithPaging(PccBaPatientsTreatNumExample example, int pageSize, int pageNum) {
        return selectByExampleWithPaging(example, pageSize, pageNum, null);
    }

    /**
     * This method was generated by Abator for iBATIS.
     * This method corresponds to the database table pcc_ba_patients_treat_num
     *
     * @abatorgenerated Fri Jun 08 12:12:13 CST 2012
     */
    public int updateByPrimaryKeyForCgs(PccBaPatientsTreatNum record) {
        int rows = getSqlMapClientTemplate().update("pcc_ba_patients_treat_num.abatorgenerated_updateByPrimaryKeyForCgs", record);
        return rows;
    }
}